package models

import (
	"rongyy/src/app"
)

type NationDictModel struct {
	Code  string `json:"code"`
	Name string `json:"name"`
}


func (rm *NationDictModel) Query() ([]NationDictModel, int64, error) {
	doc := make([]NationDictModel, 0)
	s := app.DB().Table("nation_dict")
	total, err := s.Limit(999, 0).FindAndCount(&doc)
	if err != nil {
		return nil, 0, err
	}
	return doc, total, err
}

